package com.cn.aam.checaiduo.ui.me.command;

import com.cn.aam.checaiduo.AppData;
import com.cn.aam.checaiduo.backend.CommandV2;
import com.cn.aam.checaiduo.backend.RetrofitHome;
import com.cn.aam.checaiduo.backend.observer.OnRequestListV2Listener;
import com.cn.aam.checaiduo.backend.rx.RxSchedulers;
import com.cn.aam.checaiduo.bean.me.RechageB;
import com.cn.aam.checaiduo.bean.base.PageB;

/**
 * monker on 2017/6/1.
 */

public class RecharCommand extends CommandV2<RechageB> {


    @Override
    public void execute(String pageNumber, String pageSize, OnRequestListV2Listener<RechageB> observer) {
        RetrofitHome.getInstance()
                .getInternalApi()
                .getRechargeList(pageNumber,pageSize,"","", AppData.getToken())
                .compose(RxSchedulers.<PageB<RechageB>>toMain())
                .subscribe(observer);
    }
}